import urllib.request
import json
import redis
import pprint

post_url = "http://172.16.40.70:9001/Hfbankinc/Product/py_get"

postData  = {"action":"ed6495f7e3acf7e2658bed82c1bc4d7b","borrow_id":"2","card_type":1,"money_num":161100,"pwd":"123456","user_id":"2018020636","sort":1}

# myData = ('a':"aaa",'b':"bbb")
# print(myData[a]);

data = urllib.parse.urlencode(postData).encode(encoding='UTF8')
response = urllib.request.urlopen(post_url,data)

r = redis.Redis(host='172.16.40.70', port=6379, db=15)
r.set("response",response)
pprint(response)